// web/app/(commonLayout)/layout.tsx - 共享布局，为多个页面提供共享布局
"use client";

import { ReactNode } from "react";
import { NavigationProvider } from "@/app/context/navigation-context";
import Header from "@/app/components/header";

interface AuthLayoutProps {
  children: ReactNode;
}

export default function CommonLayout({ children }: AuthLayoutProps) {
  const headerHeight = 54; // 定义header高度

  return (
    <NavigationProvider>
      <div 
        className="min-h-screen bg-background"
        style={{ '--header-height': `${headerHeight}px` } as React.CSSProperties}
      >
        <Header height={headerHeight} />
        <main className="h-[calc(100vh-var(--header-height))]">{children}</main>
      </div>
    </NavigationProvider>
  );
}
